<html>
<head><meta charset="utf-8"><title>Mutate arguments at std::process::Command · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html">Mutate arguments at std::process::Command</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="247012355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Mutate%20arguments%20at%20std%3A%3Aprocess%3A%3ACommand/near/247012355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Thäter <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html#247012355">(Jul 23 2021 at 18:06)</a>:</h4>
<p>Hi, I am new to rust stdlib development. Started to work on <a href="https://github.com/rust-lang/rust/issues/87379">https://github.com/rust-lang/rust/issues/87379</a> made my first commit.</p>
<p>Maybe someone can lend me a hand with a few Questions:</p>
<ol>
<li>The testsuite fails when calling:<br>
$ ./x.py -j 25 test library/std <br>
...<br>
error[E0658]: use of unstable library feature 'mutate_command_args'<br>
  --&gt; src/process.rs:648:6<br>
   |<br>
14 |     .args_clear()<br>
   |      ^^^^^^^^^^<br>
   |<br>
   = note: see issue <a href="https://github.com/rust-lang/rust/issues/87379">#87379</a> &lt;<a href="https://github.com/rust-lang/rust/issues/87379">https://github.com/rust-lang/rust/issues/87379</a>&gt; for more information<br>
   = help: add <code>#![feature(mutate_command_args)]</code> to the crate attributes to enable</li>
</ol>
<p>whats the correct way to provide/run a test for unstable features?</p>
<ol start="2">
<li>x.py setup (for stdlib development) installed a pre-commit hook which fails for reasons unrelated to my code:<br>
$ .git/hooks/pre-commit<br>
...<br>
tidy error: invalid license <code>MIT OR Zlib OR Apache-2.0</code> in <code>miniz_oxide 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)</code><br>
tidy error: invalid license <code>MIT OR Apache-2.0 OR Zlib</code> in <code>tinyvec_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)</code><br>
tidy error: could not find allowed package <code>cpuid-bool</code><br>
Remove from PERMITTED_DEPENDENCIES list if it is no longer used.<br>
tidy error: Dependencies not explicitly permitted:</li>
</ol>
<ul>
<li>cpufeatures 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)</li>
<li>dissimilar 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)</li>
<li>tinyvec_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)</li>
</ul>
<p>Any idea whats going wrong there/how to fix that?</p>



<a name="247015893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Mutate%20arguments%20at%20std%3A%3Aprocess%3A%3ACommand/near/247015893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html#247015893">(Jul 23 2021 at 18:38)</a>:</h4>
<p><code>./x.py -j 25 test library/std</code> is correct. You will need to add <code>#![feature(mutate_command_args)]</code> to <code>library/std/src/lib.rs</code> as suggested by the error message.</p>



<a name="247020082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Mutate%20arguments%20at%20std%3A%3Aprocess%3A%3ACommand/near/247020082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html#247020082">(Jul 23 2021 at 19:16)</a>:</h4>
<p>about the 2nd issue, did something modify the Cargo.lock in the project root?</p>



<a name="247026640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Mutate%20arguments%20at%20std%3A%3Aprocess%3A%3ACommand/near/247026640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html#247026640">(Jul 23 2021 at 20:18)</a>:</h4>
<p>I have no idea what caused that issue.</p>



<a name="247028331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Mutate%20arguments%20at%20std%3A%3Aprocess%3A%3ACommand/near/247028331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Thäter <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html#247028331">(Jul 23 2021 at 20:34)</a>:</h4>
<p>To 1. I didn't know it is Ok to define features unconditionally. Still adding it wont fix the problem, i am trying more to figure out what goes wrong here (also pushed changes to github).</p>
<p>To 2. Yes something (emacs/cargo/rustic or my sticky fingers?) broke the Cargo.lock, restoring that makes the problem go away.</p>



<a name="247028799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Mutate%20arguments%20at%20std%3A%3Aprocess%3A%3ACommand/near/247028799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Thäter <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html#247028799">(Jul 23 2021 at 20:39)</a>:</h4>
<p>... fixed, the bug was in the example code not in the test code itself and needed an extra #![feature(mutate_command_args)]</p>



<a name="247049676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Mutate%20arguments%20at%20std%3A%3Aprocess%3A%3ACommand/near/247049676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Thäter <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html#247049676">(Jul 24 2021 at 01:44)</a>:</h4>
<p>Implementation is finished now, (the windows part isn't tested yet). Pushed to my own fork. How to proceed? Make a PR to get this checked by the CI or how will the FCP initiated?</p>



<a name="247049687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Mutate%20arguments%20at%20std%3A%3Aprocess%3A%3ACommand/near/247049687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html#247049687">(Jul 24 2021 at 01:45)</a>:</h4>
<p>An FCP wouldn't be initiated at this stage since it's just the unstable API</p>



<a name="247049694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Mutate%20arguments%20at%20std%3A%3Aprocess%3A%3ACommand/near/247049694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html#247049694">(Jul 24 2021 at 01:45)</a>:</h4>
<p>Just create the PR implementing the feature and a libs team member will be assigned to review</p>



<a name="247049700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Mutate%20arguments%20at%20std%3A%3Aprocess%3A%3ACommand/near/247049700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Thäter <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Mutate.20arguments.20at.20std.3A.3Aprocess.3A.3ACommand.html#247049700">(Jul 24 2021 at 01:45)</a>:</h4>
<p>Thanks</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>